import tvm
from tvm import te


@tvm.te.hybrid.script
def outer_product(a, b):
    c = output_tensor((100,99), 'float32')
    # c = np.zeros((100,99))
    for i in range(a.shape[0]):
        for j in range(b.shape[0]):
            c[i, j] = a[i] * b[j]
    return c

a = tvm.te.placeholder((100, ), name='a')
b = tvm.te.placeholder((99, ), name='b')
c = outer_product(a, b)
print(c)

i, j = c.op.axis

print(i, j)
sch = te.create_schedule(c.op)
jo, ji = sch[c].split(j, 4)
print(jo, ji)
sch[c].vectorize(ji)
